<?php

namespace App\Http\Requests\Common;

use App\Http\Requests\ApiRequest;
use App\Models\Version\Version;

/**
 * @property string type
 * @property string software
 * @property string version
 * @property string remark
 */
class VersionUpdateRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'type'     => 'required|in:' . Version::ANDROID_BEAUTY_MIRROR, // 目前只有安卓
            'software' => 'required',
        ];
    }

    /**
     * @return array
     */
//    public function messages()
//    {
//        return [
//            'type.*'     => '版本类型必须为' . Version::ANDROID_BEAUTY_MIRROR,
//            'software.*' => '软件必须为文件或者url地址',
//        ];
//    }
}
